package com.linked.goods.goodsbase.bean.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.linked.goods.goodsbase.bean.dto.GoodsBrandDTO;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author :dbq
 * @date : 2023/5/17 9:08
 * @description : desc
 */
@Data
@TableName("goods_goods_brand")
public class GoodsBrandPO {

    /**
     * 商品品牌表
     */
    @TableId(value="goods_brand_id",type = IdType.ASSIGN_UUID)
    private String goodsBrandId;

    /**
     * 品牌代码
     */
    @TableField("brand_code")
    private String brandCode;

    /**
     * 品牌名称
     */
    @TableField("brand_name")
    private String brandName;

    /**
     * 品牌logo
     */
    @TableField("brand_log")
    private String brandLog;

    /**
     * 品牌描述
     */
    @TableField("brand_desc")
    private String brandDesc;

    /**
     * create_time
     */
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * data_status
     */
    @TableField("data_status")
    private Integer dataStatus;

    public GoodsBrandPO(GoodsBrandDTO param) {
        this.brandCode = param.getBrandCode();
        this.brandName = param.getBrandName();
        this.brandDesc = param.getBrandDesc();
        this.brandLog = param.getBrandLog();
    }

    public GoodsBrandPO() {
    }
}
